package com.visec.hdy.transmission.ftp.code;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;

import org.apache.commons.net.ftp.FTPFile;

import com.visec.hdy.transmission.beans.FileModel;
import com.visec.hdy.transmission.beans.FileModelHandle;
import com.visec.hdy.transmission.beans.FileModelProxy;

public interface FtpClientInter {

	public List<FTPFile> listFiles(String path);

	public List<FileModel> listAllFiles();

	public <T extends FileModelProxy> List<T> listAllFiles(T fileModelProxy);

	public void handleAllFiles(FileModelHandle handle);

	public List<String> listDirs(String path);

	public boolean entryDir(String dir);

	public boolean deleteFile(String fileName);

	public boolean deleteDir(String dir);

	public boolean createDir(String dir);

	public String currentDir();

	public boolean uploadFile(String ftpPath, InputStream i, boolean isAdd);

	public OutputStream uploadFile(String ftpPath, boolean isAdd);

	public InputStream downFile(String ftpPath);

	public boolean logout();

	public boolean login();
	
	public boolean relogin();

	public FtpClientInter copy();

	public boolean isConnected();

	public FTPFile getFile(String fileName);

	public boolean setFileType(int fileType);
	
	public boolean completePendingCommand();
}
